import { request} from '@/utils/request.util';
import type {Root,DeptListRoot} from '@/types/root'
import type { Pagination } from '@/types/pagination';
import type { Response, Res } from '@/types/common';

import type {MfrTablePagination,MfrInfo,MfrTable,MfrResponse} from '@/types/mfr'
// /stock/supply/?mfrName=&pageNo=1&pageSize=10

//查看药厂列表
export const getMfrList =  (body:MfrTablePagination) => request.get<MfrResponse> ("/stock/supply/getMfrList", {
  params: body
});  

//新增药厂
export const addMfr = (body: MfrInfo) => request.post<Response<Res>>("/stock/supply/addMfr",body);

//编辑药厂
export const updateMfr = (body:MfrInfo) => request.post<Response<Res>>("/stock/supply/updateMfr",body);

//删除厂家
export const deleteMfr = (mfrId:string) => request.post<Response<Res>>("/stock/supply/deleteMfr",{mfrId});

//启用厂家
export const enableMfr = (mfrId:string) => request.post<Response<Res>>("/stock/supply/enableMfr",{mfrId});

//停用厂家
export const disableMfr = (mfrId:string) => request.post<Response<Res>>("/stock/supply/disableMfr",{mfrId});